<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div>{{content|myFilter2}}</div>
        <input type="text" :value="content|myFilter">
    </div>
    <script src="../node_modules/vue/dist/vue.js"></script>
    <script>
        Vue.filter('myFilter2', function (value) {
            return value.replace("哈哈哈", "hhh").replace("您好啊", "hello");
        })
        var vm = new Vue({
            el: "#app",
            data: {
                content: "您好啊！哈哈哈"
            },
            filters: {
                myFilter: function (value) {
                    return value.replace("哈", "嗯").replace("！", "？");
                }

            }
        })
    </script>
</body>

</html>